#! /user/bin/env python
#coding:utf-8

import pymongo
import time
import datetime


addr = "127.0.0.1:27017"

account = "admin"
password = "123456"

def collection_del():
        db_name = "yange_data"
        myclient = pymongo.MongoClient("mongodb://" + addr + "/")
        dblist = myclient.list_database_names()
        if db_name in dblist:
                mydb = myclient[db_name]
                mydb.authenticate(account, password)
                tblist = mydb.list_collection_names()
                doc = mydb["shisun_record"]
                doc.drop()
                print "删除shisun_record"



collection_del()
